<!--{template admin/header}-->
<body id="homepage">
    <div id="breadcrumb">
        <ul>
            <li><img src="static/img/icons/icon_breadcrumb.png"
                     alt="Location" /></li>
            <li><strong>位置:</strong></li>
            <li><a href="admin.php">主页</a> - 用户</li>
        </ul>
    </div>
    <div id="rightside" class="user_info">
        <div class="contentcontainer">
            <div class="headings altheading">
                <h3>用户搜索</h3>
            </div>
            <div class="contentbox">
                <div class="extrabottom" style="height:auto;">
                    <form method="get" action="admin.php" class="form-inline" role="form" >
                    	<div class="input-prepend">
							<span class="add-on">用户</span>
							<input class="span2" id="prependedInput" type="text" placeholder="账号" name="account" value="$_GET[account]" >
						</div>
						<div class="input-prepend">
							<span class="add-on">UID</span>
							<input class="span2" id="prependedInput" type="text" placeholder="UID" name="uid" value="$_GET[uid]" >
						</div>
						<div class="input-prepend">
							<span class="add-on">邮箱</span>
							<input class="span2" id="prependedInput" type="text" placeholder="邮箱" name="email" value="$_GET[email]" >
						</div>
                    	<select name="perpage" class="span2">
                            <option value="20"$perpages[20]>每页显示20个</option>
                            <option value="50"$perpages[50]>每页显示50个</option>
                            <option value="100"$perpages[100]>每页显示100个</option>
                        </select> 
                        <input type="hidden" name="ac" value="user" />
                        <input type="submit" value="点击查找" class="btn" /> 
                    </form>
                </div>
                <div style="clear: both;"></div>
                <table width="100%" style="margin-top: 20px;">
                    <thead>
                        <tr>
                            <th>UID</th>
                            <th>登陆账号</th>
                            <th>昵称</th>
                            <th>Email</th>
                            <th>注册时间</th>
                            <th>注册IP</th>
                            <th>注册设备</th>
                            <th>主页&nbsp;&nbsp;封禁设备&nbsp;&nbsp;禁言</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <!--{loop $list $value}-->
                        <tr>
                            <td>{$value[uid]}</td>
                            <td>{$value[account]}</td>
                            <td><!--{if $value[status] > 0}--><span style="color:red;">{$value[nickname]}</span>
                                <!--{else}-->{$value[nickname]}<!--{/if}--></td>
                            <td><a href="mailto:{$value[email]}">{$value[email]}</a></td>
                            <td>
                                <!--{date('Y-m-d H:i',$value[registerTime])}-->
                            </td>
                            <td><a href="http://www.ip138.com/ips138.asp?ip={$value[registerIp]}&action=2" target="_blank">{$value[registerIp]}</a></td>
                            <td>{$value[registerDevice]}</td>
                            <td>
                                <a href="admin.php?ac=user_profile&uid=$_GET[uid]" target="_blank"><img src="static/img/icons/gif_people.gif" width="24" height="24" /></a>
                                <!--{if $value[status] > 0}-->
                                <a href="admin.php?ac=user&op=chain&uid={$value[uid]}&status=0" title="解封" onClick="ajaxget(this.href);return false;">
                                    <img src="static/img/icons/gif_recommend.gif" width="24" height="24" /></a>
                                <!--{else}-->&nbsp;&nbsp;&nbsp;&nbsp;
                                <a href="admin.php?ac=user&op=chain&uid={$value[uid]}&status=1" title="封禁" onClick="ajaxget(this.href);return false;">
                                    <img src="static/img/icons/gif_delete.gif" width="24" height="24" /></a><input type="checkbox" name="forbidDevice" value="1" checked="true">
                                <!--{/if}-->
                                <button onclick="showshutup({$value[uid]})">禁言</button>
                            </td>
                            <td>
                            	<a href="javascript:;" onclick="showability({$value[uid]})">申请达人</a> || 
                            	<button url="admin.php?ac=user&op=removeUser&uid={$value[uid]}" title='删除用户' onclick="show_confirm(this)">删除用户</button>
                            	
                            </td>
                        </tr>
                        <!--{/loop}-->
                    </tbody>
                </table>
                

                

                <div class="extrabottom">
                    <ul>
                        <li><img src="static/img/icons/gif_people.gif" />作者信息</li>
                        <li><img src="static/img/icons/gif_delete.gif" />封禁</li>
                    </ul>
                    <div class="bulkactions">
                        <ul class="pagination">
                            <!--{if $prevpurl!=''}-->
                            <li class="text"><a href="{$firstpurl}" title="">第一页</a></li>
                            <li class="text"><a href="{$prevpurl}" title="">上一页</a></li>
                            <!--{/if}-->
                            <li class="text"><a href="{$nextpurl}" title="">下一页</a></li>
                        </ul>
                        <div style="clear: both;"></div>
                    </div>
                </div>
                <div style="clear: both;"></div>
            </div>
        </div>
		<div id='ability_add' style="display:none;">
			<b>达人申请</b>
			<form action="admin.php" method="get">
				达人类别:<select name='label'>
					<option value='1'>情感</option>
					<option value='5'>健康</option>
					<option value='6'>美妆</option>
					<option value='7'>星座</option>
					<option value='9'>摄影</option>
					<option value='10'>搞笑</option>
				</select>
				<input type='hidden' name='op' value='addAbility'/>
				<input type='hidden' name='ac' value='ability'/>
				<input type='hidden' name='uid' value=''  class='ability_uid'/><br />
				达人宣言:<input type='text' name='content' />
				<input type='submit' name='submit' value='申请' class='btn'/>
			</form>
		</div>
		<div id='ability_expert' style="display:none;">
			<b>达人及名人堂</b>
			<form action="admin.php" method="get">
				达人类别:<select name='label'>
					<option value='1'>情感</option>
					<option value='5'>健康</option>
					<option value='6'>美妆</option>
					<option value='7'>星座</option>
					<option value='9'>摄影</option>
					<option value='10'>搞笑</option>
				</select>
				<input type='hidden' name='op' value='addAbilityAndExpert'/>
				<input type='hidden' name='ac' value='ability'/>
				<input type='hidden' name='status' value='1'/>
				<input type='hidden' name='uid' value=''  class='ability_expert_uid'/><br />
				达人宣言:<input type='text' name='content' />
				<input type='submit' name='submit' value='申请' class='btn'/>
			</form>
		</div>
		<div id='shutup_user' style="display:none;">
			<b>注意:禁言时间(天)</b>
			<form action="admin.php" method="get">
				<input type='hidden' name='op' value='actionManage'/>
				<input type='hidden' name='action' value='shutUpUser'/>
				<input type='hidden' name='ac' value='manage'/>
				禁言:<input type='text' name='time' style="width:50px"/> 天
				<input type='hidden' name='uid' value=''  class='shutup_uid'/><br />
				<input type='submit' name='submit' value='禁言' class='btn'/>
			</form>
		</div>
    </div>
    <script type="text/javascript">
	    function show_confirm(obj) {
		    var r=confirm("注意点击删除后用户信息将再也查询不到!!!!!!!!");
		    var url = $(obj).attr('url');
		    if (r==true) {
		      $.get(url,function(result){
		    	  if (result == 1){
		    		  alert("删除成功");
		    		  return;
		    	  }
		    	  alert("删除失败");
		      });
		    }
	    }
    	function showability(uid){
    		$("#ability_add").show();
    		$("#ability_expert").hide();
    		$(".ability_uid").attr('value', uid);
    	};
    	function showabilityAndExpert(uid){
    		$("#ability_expert").show();
    		$("#ability_add").hide();
    		$(".ability_expert_uid").attr('value', uid);
    	};
    	function showshutup(uid){
    		$("#shutup_user").show();
    		$("#ability_add").hide();
    		$("#ability_expert").hide();
    		$(".shutup_uid").attr('value', uid);
    	};
    </script>
    <!--{template admin/leftside}-->
    <!--{template admin/footer}-->